<%-- 
    Document   : changerights
    Created on : 6 janv. 2014, 17:21:32
    Author     : root
--%>

<%@page import="java.util.HashMap"%>
<%@page import="java.util.Map"%>
<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<% HttpSession thisSession = (HttpSession) request.getAttribute("thisSession");
    String account = (String) request.getAttribute("account");
    String rights = (String) request.getAttribute("rights");
    String demande = "";
      String msgFile = "";
    Map<String,String> waitingFile=(HashMap<String,String>) request.getAttribute("waitingFile");
    if(waitingFile.size()>0){
        msgFile = msgFile + "("+waitingFile.size()+")";
        
    }
    ArrayList<String> demandeContact = (ArrayList<String>) thisSession.getAttribute("demandeContact");
    if (demandeContact.size() != 0) {
        boolean accept = true;
        int notif = demandeContact.size();
        if (notif != 0) {
            demande = " (" + notif + ")";
        }
    }
    ArrayList<String> newMessage = (ArrayList<String>) thisSession.getAttribute("newMessage");
    String newMsg = "";
    if (newMessage.size() != 0) {
        newMsg = newMsg + " (" + newMessage.size() + ")";
    }
%>


<html>
    <head>
        <link rel="stylesheet" type="text/css" href="css/administrator.css"/>
        <title>MISS Change Rights</title>
    </head>
    <body>
        <header>
            <a href="RedirectConnected"><img src="Pictures/logo.png" class="logo" style="float: outside;"></a>
            <div class="zone">
                <div class="zone-right"></div>
                <div class="zone-left"></div>
                <div class="zone-bg">
                    <ul>
                        <li><a href="RedirectConnected"><span>Home <%= newMsg%></span></a></li>
                        <li><a href="NewContact.html"><span>Contact <%= demande%></span></a></li>
                        <li><a href="profile.html"><span>Profile</span></a></li>
                        <li><a href="File.html"><span>File <%= msgFile%></span></a></li>
                        <li class="current"><a href="Administrator.html"><span>Administration</span></a></li>
                        <li><a href="logout.html"><span>Logout</span></a></li>
                    </ul>
                </div>
            </div>
        </header>
        <div class="general">
            <b> Account : </b> <%= account%>
            <form method="post" action="ChangeRights">
                <input type="hidden" name="account" value="<%= account%>">
                <label for="idRight"> Rights:<br>
                    <label for="idRight1">Admin</label>               
                    <input type="radio" name="rights" id="idRight1" value="admin">             
                    <label for="idRight2">User</label>
                    <input type="radio" name="rights" id="idRight2" value="user"> 
                </label>
                <input type="submit" value="change"/>
            </form>
        </div>
    </body>

</html>